package com.example.javaeespringioc.demos;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("demo")
@Controller
public class demo2 {
    @Value("${test.key1}")
    int key1;
    @Value("${test.key2}")
    String key2;
    @RequestMapping("getKey")
    @ResponseBody
    String getKey(){
        return "key1:"+key1+",key2:"+key2;
    }
}
